let num = 0;

setInterval(() => {
    if(num === 5) {
        console.log('结束')

        process.abort()
    }

    num++

    console.log(num)
}, 1000)